var myReserve = function (str) {
    var lowStr = str.toLocaleLowerCase();
    var arr = lowStr.split('').reverse().join("");
    return arr;
};
console.log("回文", myReserve("CBA"));
var my_loggerLitter = function (arr) {
    var newArr = arr[0].split('');
    arr.forEach(function (item) {
        if (newArr.length < item.split('').length) {
            newArr = item.split('');
        }
    });
    return newArr.join('');
};
console.log("最长单词", my_loggerLitter(['city', "cityOfStar", "perfect"]));
var toHump = function (str) {
    var arr = str.split(' ');
    var newStr = arr[0];
    for (var i = 1; i < arr.length; i++) {
        newStr += arr[i][0].toLocaleUpperCase() + arr[i].slice(1);
    }
    return newStr;
};
console.log("转驼峰", toHump("i'm chasing perfection"));
